﻿// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
// for details on configuring this project to bundle and minify static web assets.

// Write your JavaScript code.

$(document).ready( function(){
    $('.done-check').on('click', function(e){
        markCompleted(e.target)
    })
});

function markCompleted(chk){
    chk.disabled = true;

    var row = chk.closest('tr');
    $(row).addClass('done');

    var form = chk.closest('form');
    form.submit();
}